import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;

public class JGI_Actionlistener implements ActionListener
{
	JAPI_SocketOutputStream JGI_actionstream;
	int JGI_id;	
	int debuglevel=0;	
	
	public JGI_Actionlistener(int object_id,  JAPI_SocketOutputStream action )
	{
		JGI_actionstream=action;
		JGI_id = object_id;	
	}
	
	public void actionPerformed(ActionEvent e) 
	{
		if(debuglevel > 1) System.out.println("Action Event in Object : "+this.JGI_id);	
		try
		{	
			JGI_actionstream.sendInt(JGI_id);
		}
		catch(IOException exce) {}
	}
	
	public void setdebuglevel(int level)
	{
		debuglevel=level;
	}
}